﻿using System;
using System.Windows.Forms;

namespace Module_Debug
{
    class Setting
    {                     //底层注册包头
                          // 0x08: RM67120的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x09: ST7801的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x19: RM67295的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x29: RM67198的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x2E: RM67198的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x0E: RM67160的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x1E: RM67162的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x2A: NT37710的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x2b: HX37710的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x2C: RM69300的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x2D: ICN9608的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x30: R66455 的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x31: TC1100 的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x3C: RM69350的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x3D: RM6D010的Gamma读写、寄存器读写、OTP读写 设置  返回
                          // 0x3E: RM692Ax的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4A: CH13721的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4B: FT2711的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4C: UD61720的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4D: VTDCaSDKObj.R_x110的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4E: NT37700C的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x4F: RM692C9的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x65: SD5202的Gamma读写、寄存器读写、OTP读写    设置  返回
                          // 0x69: NT37800A的Gamma读写、寄存器读写、OTP读写    设置  返回

        public class ComSet
        {
            public static int comBaudRate = 115200;
        }
        public class IC_Type
        {
            public static byte ST7801 = 0;
            //public static byte RM67120 = 1;
            public static byte RM690C0 = 1;
            public static byte HI3288_V110_C21 = 2;
            public static byte SD5502 = 3;
            public static byte RM67295 = 4;
            public static byte RM67198 = 5;
            public static byte NT37710 = 6;
            public static byte HX83200A = 7;
            public static byte RM69300 = 8;
            public static byte RM692G3 = 9;
            public static byte RM69298 = 10;
            public static byte RM69350 = 11;
            public static byte RM6D010 = 12;
            public static byte SyR66455 = 13;
            public static byte PRTC1100 = 14;
            public static byte XYCH13721 = 15;
            public static byte CXUD61720 = 16;
            public static byte FT2711 = 17;
            public static byte RM692Ax = 18;
            public static byte VTDR6100 = 19;
            public static byte NT37700C = 20;
            public static byte RM692Ax_KPQ = 21; //KPQ专用
            public static byte VTDR6110 = 22;   //这里编号请与IC index保持一致
            public static byte FT2201 = 23;
            public static byte rm69310 = 24;
            public static byte RM692Cx_M2 = 25;  //米兔专用
            public static byte NT37900 = 26;  //米兔特殊Gamma   20221123 转为NT37900使用
            public static byte RM692Cx = 27;//RM692C4
            public static byte RM692C9 = 28;
            public static byte RM69330 = 29;//RM69330
            public static byte RM692Ax_641 = 30;
            public static byte RM69200 = 31;//RM69200
            public static byte RM692H5 = 32; //RM692H5-C21
            public static byte DW_RM6729x_GammaTest = 33;//丁伟Gamma逐点数据抓取专用窗口
            public static byte ICNA3310 = 34;//集创ICNA3310
            public static byte RM692Cx_ProjA = 35;//A 项目
            public static byte IC69091 = 36;//RM69091
            public static byte RM69350_SK622_raydium = 37;//SK622 瑞鼎芯片
            public static byte ILI7835_Gamma = 38;//SK622 瑞鼎芯片
            public static byte VTDR7120 = 39;//SK云英谷芯片
            public static byte IC690A0 = 40; //RM690A0
            public static byte VT6110C = 41;    // VT6110C
            public static byte ILI8688 = 42; //ILI8688
            public static byte RM692EX = 43; // 瑞鼎RM692EX
            public static byte SD5202 = 44;
            public static byte RM69310_GW010 = 45;
            public static byte RM692D9 = 46;    // 瑞鼎RM692D9
            public static byte NT37800A = 47;    //联咏NT37800A
            public static byte VTDR5120 = 48;    //云英谷芯片
            public static byte NT37701A = 49;    //联咏NT37701A
            public static byte ICNA3511 = 50;    //集创ICNA3511
            public static byte ILI7838E_2A7 = 51;    //云英谷VTDR6110C            
            public static byte FT2306 = 52;    //
            public static byte FT2388 = 53;    //
            public static byte NT37350 = 54;    //
            //public static byte SD5205 = 55;   //582搭配昇显SD5205
            public static byte ILI8818 = 56;//奕力8818
            public static byte IP_ILI8818 = 57;//奕力7838  IP
            public static byte VTDR6130 = 58;    //云英谷VTDR6130
            //public static byte CH13726 = 59;    //芯颖 CH13726
            public static byte SD4202 = 60;    //昇显 SD4202
            public static byte RM692Ex_694UDC = 61;    //RM692EX  694 UDC项目使用 
            public static byte NT37350_GW020 = 62;
            public static byte RM69600_GW110 = 63;
            public static byte NT37350B = 64;
            public static byte RM690B0 = 65;    //瑞鼎 RM690B0 天柱143 MIPI
            public static byte VT6130_680 = 66;    //天池6.8
            //public static byte SD5207 = 67;   //582搭配昇显SD5207
            public static byte NT38350_147 = 68;
            public static byte NT38770 = 69;//NT38770
            public static byte SD5306 = 70;//SD5306
            public static byte SD5302 = 71; //SD5302
            public static byte RM692C9_647 = 72;
            public static byte RM692Fx_667 = 73;
            public static byte ICNA3311 = 74;
            public static byte RM690B0_QSPI = 75;//RM690B0 翠华山162 QSPI
            public static byte ICNA3306 = 76;
            public static byte syR66462 = 77; //synaptics
            public static byte OD6630 = 78; //HAOWEI-Omnivision
            public static byte ICN3306 = 79;
            public static byte RM692E1_667_120HZ = 80;   //RM692E1_667  120hzDOE
            public static byte VTDR6115 = 81;   //VTDR6115 60/120Hz
            public static byte SD5301 = 82;   //644-104/106+SD5301
            public static byte NT37703 = 83;   //DOE NT37703
            public static byte RMKONGZHANWIE = 84;   //----占用，未用-------------------
            public static byte CH13A11 = 85;   //CH13A11_6.0/644
            public static byte NT37705 = 86;   //NT37705
            public static byte HI3288 = 87;   //HI3288
            public static byte RM6D030 = 88;   //RM6D030
            public static byte Icna3512 = 89;  //Icna3512
            public static byte RM692E5_ADB = 90; //RM692E5_ADB模式
            public static byte SH8501A = 91; //huashan146+SH8051A
            public static byte NT38360 = 92; //huashan146+SH8051A            
            public static byte NT71181 = 0x5D; //NO = 93 ;  FOR  NT71181+12.6   IIC + BIST CODE USE
            public static byte NT37900A = 94; //
            public static byte NT37706A = 0x05;    //
            //public static byte CH13726A = 93;//
        }
        public class Demura_Type
        {
            public static byte R66455_GM820 = 0x00;
            public static byte R66456_GM825 = 0x01;
            //----------------------------------
            public static byte RM692A6_GM830 = 0x02;
            public static byte RM692A9_GM870 = 0x03;
            //----------------------------------
            public static byte RM69298_GM720 = 0x04;
            public static byte RM69299_FM720 = 0x05;
            public static byte RM69298_GM760 = 0x06;
            //----------------------------------
            public static byte RM69350_GM620 = 0x07;
            public static byte NT37700C_GM820 = 0x08;
            public static byte VT5100_GM870 = 0x09;
            //----------------------------------
            public static byte RM692C9_GM8A0 = 0x0A;
            public static byte RM692A9_GM8A0 = 0x0B;
            public static byte RM69200_GM8A0 = 0x0C;
            public static byte RM692A9_GT666 = 0x0D;
            public static byte RM692C4_F4 = 0x0E;
            //----------------------------------
            public static byte R66451_ALPHA = 0x0F;
            public static byte SD5202 = 0x10;  //SD5202
            public static byte RM69351_GM920 = 0x11;
            public static byte R66451_GM862 = 0x12;
            public static byte NT37701_FM010 = 0x13;
            public static byte RM692C9_GM828 = 0x14;
            //----------------------------------
            public static byte VT6110C_GM8A0 = 0x15;
            public static byte VT6110_GM750 = 0x16;
            public static byte RM692C9_GM010 = 0x17; //3.92
            public static byte RM692C9_GM930 = 0x18; //3.92
            public static byte RM692D7_GM920 = 0x19; //6.44+RM692D7
            public static byte NT37800A_GM862 = 0x1A; //6.65+NT37800A
            public static byte NT37701_GM040 = 0x1B; //6.8+NT37701A
            public static byte RM692EX_DemuraIP_2X4 = 0x1C; //RM692EX+DemuraIP
            //----------------------------------
            public static byte RM692D9_GM930 = 0x1D; //6.92+RM692D9
            public static byte VT6110C_601 = 0x1E;  //VTDR6110C + 601
            public static byte IL7835_664 = 0x1F;
            public static byte NT37701_GM820 = 0x20;  //639DOE+NT37701
            public static byte RM692E1_667 = 0x21;  //RM692E1_667
            public static byte RM692EX_DemuraIP_4X2 = 0x22; //RM692EX+DemuraIP 4*2
            public static byte RM692EX_DemuraIP_667 = 0x23; //RM692EX+DemuraIP 4*2
            public static byte RM692DX_667_GM051 = 0x24;  //RM692DX_667   
            public static byte RM692C9_GM080 = 0x25;  //RM692CX_643
            public static byte NT37800A_GM040 = 0x26;  //NT37800A_680  
            //0x27 PASS  对齐编号用
            public static byte RM692C9_GM060 = 0x28;   //RM692C9_GM060  6.62
            public static byte RM692C9_GM070 = 0x29;   //RM692C9_GM070  6.11
            public static byte SD4202_GM920 = 0x2A;   //SD4202_GM920  644 二供
            public static byte VTD6130_XXXXX = 0x2B;    //VTD6130 IC验证
            public static byte VTD6110C_GM090 = 0x2C;    //VTD6110C_GM090   645
            public static byte VTD6110C_GM081 = 0x2D;    //VTD6110C_GM081   647
            public static byte RM692C9_GM081 = 0x2E;    //RM692C9_GM081   647
            public static byte SD5302_GM056 = 0x2F;   //SD5302_GM056  667
            public static byte SD5306_GM110 = 0x30;   //SD5306_GM110  6.1
            public static byte RM692F0_GM055 = 0x31;   //RM692F0_GM055  6.67 + RM692F0
            public static byte RM692E0_GM043 = 0x32;   //RM692E0_GM043  6.80UDC
            public static byte CH13A11_644 = 0x33;   // CH13A11 644/6.0 
            public static byte NT37701_D20 = 0x34;   // NT37701_D20  V3     
            public static byte RM692HX_C16 = 0x36;   // RM692HX_C16  V3   
            public static byte RM692H5_C21 = 0x37;   // RM692H5_C21  V3   
            public static byte NT37801_791 = 0x38;   // NT37801_791  V1   
            public static byte RM692E5_M344 = 0x39;   // RM692E5_M344  M4   
            public static byte WD6211_670 = 0x3A;     // WD6211_6.7 V1 
            public static byte WD6200_644 = 0x3B;     // WD6200_6.44二元化 V1 
            public static byte WD6300_670_Gamma = 0x3C;     // WD6300_6.7_Gamma 
            public static byte WD6300_670_Demura = 0x3D;     // WD6300_6.7_Demura
        }

        public class TempRecord
        {
            public static int cmdLen;
            public static int CmdType;
            public static int RM67160CmdType;
            public static int ST7801CmdType;
            public static int RM67120CmdType;
            public static int NT37710CmdType;
            public static int HX83200CmdType;
            public static int RM69300CmdType;
            public static int RM69350CmdType;
            public static int RM6D010CmdType;
            public static int CH13721CmdType;
            public static int FT2711CmdType;
            public static int FT2306CmdType;
            public static int UD61720CmdType;
            public static int R66455CmdType;
            public static int TC1100CmdType;
            public static bool VerChecking;
            public static int RM692AXCmdType;
            public static int VT6110CmdType;
            public static int VT5100CmdType;
            public static int VTDR6100CmdType;
            public static int NT37700CCmdType;
            public static int RM69330CmdType;
            public static int RM69310CmdType;
            public static int RM692CxCmdType;
            public static int RM692C9CmdType;
            public static int ILI7835CmdType;
            public static int ICNA3310CCmdType;
            public static int IC69091CmdType;
            public static int ILI7835_GammaCmdType;
            public static int ILI8818_GammaCmdType;
            public static int VTDR7120CmdType;
            public static int IC690A0CmdType;
            public static int ILI8688CmdType;
            public static int TC1105_GammaCmdType;
            public static int RM692EXCmdType; //TEST
            public static int SD5202CmdType;
            public static int NT37701CmdType;
            public static int IC69310CmdType;
            public static int RM692D9CmdType;
            public static int NT37800ACmdType;
            public static int NT37701ACmdType;
            public static int ICNA3511CmdType;
            public static int SD5205CmdType;
            public static int VTDR6130CmdType;
            public static int CH13726CmdType;
            public static int SD4202CmdType;
            public static int NT37350CmdType;
            public static int RM69600CmdType;
            public static int RM690B0CmdType;
            public static int VT6130CmdType;
            public static int NT38770CmdType;
            public static int SD5306CmdType;
            public static int ICNA3311CmdType;
            public static int NT38350CmdType;
            public static int ICNA3306CmdType;
            public static int SD5301CmdType;
            public static int CH13A11CmdType;
            public static int SH8501ACmdType;
            public static int NT38360CmdType;
            public static int NT37900CmdType;
        }


        public class Offset_Property
        {
            private int _gamma_point;
            private double _gamma_x_off;
            private double _gamma_y_off;
            private double _gamma_lum_off; //创建Gamma_Property对象
            public Offset_Property(int NO, double X_OFF, double Y_OFF, double LUM_OFF)
            {
                this._gamma_point = NO;
                this._gamma_x_off = X_OFF;
                this._gamma_y_off = Y_OFF;
                this._gamma_lum_off = LUM_OFF;
            }
            public int NO
            {
                get { return _gamma_point; }
            }
            public double X_OFF
            {
                get { return _gamma_x_off; }
            }
            public double Y_OFF
            {
                get { return _gamma_y_off; }
            }
            public double LUM_OFF
            {
                get { return _gamma_lum_off; }
            }
        }

        public class Gamma_Property
        {
            private int _gamma_point_num;
            private double _gamma_lum; //
            private double _gamma_x;
            private double _gamma_y;
            private double _gamma_curve; //创建Gamma_Property对象

            public Gamma_Property(int Points_num, double Lum, double X, double Y, double Curve)
            {
                this._gamma_point_num = Points_num;
                this._gamma_lum = Lum;
                this._gamma_x = X;
                this._gamma_y = Y;
                this._gamma_curve = Curve;
            }
            public int Points_num
            {
                get { return _gamma_point_num; }
            }
            public double Lum
            {
                get { return _gamma_lum; }
            }
            public double X
            {
                get { return _gamma_x; }
            }
            public double Y
            {
                get { return _gamma_y; }
            }
            public double Curve
            {
                get { return _gamma_curve; }
            }

        }

    }
}
